<?php
/**
 * Eka Framework 0.3.0
 *
 * @copyright Copyright (c) 2008 Alexey Yu. Chuprina <656b61@gmail.com> (http://php-eka.googlecode.com)
 * @license http://www.opensource.org/licenses/mit-license.php MIT License
 *
 * @version $Id$
 */

require_once 'Eka/Db/Table/Row/Abstract.php';

/**
 * Eka_Db_Table_Row_Model
 *
 * @package Db
 * @subpackage Table
 */
abstract class Eka_Db_Table_Row_Model extends Eka_Db_Table_Row_Abstract
{
	/**
	 * @var Eka_Db_Table_Model
	 */
	protected $table;
	
	static protected function columnToMethodName($column)
	{
		return str_replace(' ', '', ucwords(str_replace('_', ' ', $column)));
	}

	protected function insert()
	{
		parent::insert();
		$this->table->addToCache($this);
	}
}